/*
 * 类目 项目清单  
 */
import { getRequest, postRequest } from '/@/lib/axios';

export const DetailListApi = {

    // 项目  获取年份  /foundation/blagreement/getListYear
    getListYear: (id) => {
        return getRequest(`/foundation/blagreement/getListYear`);
    },
    // 根据年份 获取清单   /foundation/blagreement/getList?year=2024
    getFundList: (param) => {
        return postRequest(`/foundation/blagreement/getList`, param);
    },
    // 项目  增加  
    foundationAdd: (param) => {
        return postRequest('/foundation/blproject/save', param);
    },
    // 项目   修改  
    foundationUpdate: (param) => {
        return postRequest('/foundation/blproject/update', param);
    },
    // 删除   
    foundationDelete: (categoryId) => {
        return postRequest(`/foundation/blproject/delete`, categoryId);
    },

    //文件上传 /foundation/blprojectattach/upload?blProjectNum=1&type=1
    uploadFile: (folder, param) => {
        return postRequest(`/foundation/blprojectattach/upload?${folder}`, param);
    },

    // 根据id 获取附件地址  /foundation/blproject/getAttach/1
    getIdsFile: (id) => {
        return getRequest(`/foundation/blproject/getAttach/${id}`);
    },

    // 删除附件  /foundation/blprojectattach/delete/1  
    delFile: (id) => {
        return postRequest(`/foundation/blprojectattach/delete`, id);
    }
};
